import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standard_scence_safe_appliance_entity.dart';

StandardScenceSafeApplianceEntity $StandardScenceSafeApplianceEntityFromJson(Map<String, dynamic> json) {
  final StandardScenceSafeApplianceEntity standardScenceSafeApplianceEntity = StandardScenceSafeApplianceEntity();
  final String? checkPerson = jsonConvert.convert<String>(json['checkPerson']);
  if (checkPerson != null) {
    standardScenceSafeApplianceEntity.checkPerson = checkPerson;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    standardScenceSafeApplianceEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    standardScenceSafeApplianceEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    standardScenceSafeApplianceEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    standardScenceSafeApplianceEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    standardScenceSafeApplianceEntity.deleted = deleted;
  }
  final String? departmentId = jsonConvert.convert<String>(json['departmentId']);
  if (departmentId != null) {
    standardScenceSafeApplianceEntity.departmentId = departmentId;
  }
  final String? departmentIdName = jsonConvert.convert<String>(json['departmentIdName']);
  if (departmentIdName != null) {
    standardScenceSafeApplianceEntity.departmentIdName = departmentIdName;
  }
  final String? distributionRecords = jsonConvert.convert<String>(json['distributionRecords']);
  if (distributionRecords != null) {
    standardScenceSafeApplianceEntity.distributionRecords = distributionRecords;
  }
  final String? dueDate = jsonConvert.convert<String>(json['dueDate']);
  if (dueDate != null) {
    standardScenceSafeApplianceEntity.dueDate = dueDate;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    standardScenceSafeApplianceEntity.id = id;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    standardScenceSafeApplianceEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    standardScenceSafeApplianceEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    standardScenceSafeApplianceEntity.updateDate = updateDate;
  }
  final String? workProjectName = jsonConvert.convert<String>(json['workProjectName']);
  if (workProjectName != null) {
    standardScenceSafeApplianceEntity.workProjectName = workProjectName;
  }
  return standardScenceSafeApplianceEntity;
}

Map<String, dynamic> $StandardScenceSafeApplianceEntityToJson(StandardScenceSafeApplianceEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['checkPerson'] = entity.checkPerson;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['departmentId'] = entity.departmentId;
  data['departmentIdName'] = entity.departmentIdName;
  data['distributionRecords'] = entity.distributionRecords;
  data['dueDate'] = entity.dueDate;
  data['id'] = entity.id;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['workProjectName'] = entity.workProjectName;
  return data;
}

extension StandardScenceSafeApplianceEntityExtension on StandardScenceSafeApplianceEntity {
  StandardScenceSafeApplianceEntity copyWith({
    String? checkPerson,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? departmentId,
    String? departmentIdName,
    String? distributionRecords,
    String? dueDate,
    String? id,
    String? updateBy,
    String? updateById,
    String? updateDate,
    String? workProjectName,
  }) {
    return StandardScenceSafeApplianceEntity()
      ..checkPerson = checkPerson ?? this.checkPerson
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..departmentId = departmentId ?? this.departmentId
      ..departmentIdName = departmentIdName ?? this.departmentIdName
      ..distributionRecords = distributionRecords ?? this.distributionRecords
      ..dueDate = dueDate ?? this.dueDate
      ..id = id ?? this.id
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..workProjectName = workProjectName ?? this.workProjectName;
  }
}
